<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>

<head>

<link rel="stylesheet" type="text/css" href="ui/pages/login.css">
<link rel="stylesheet" type="text/css" href="ui/pages/dashboard.css">
<link rel="stylesheet" type="text/css" href="ui/style.css">
<link rel="stylesheet" type="text/css" href="ui/bootstrap.css">
<link rel="stylesheet" type="text/css"
	href="ui/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css"
	href="ui/pages/glDatePicker.default.css">
<link
	href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600"
	rel="stylesheet">
	  <link href='http://fonts.googleapis.com/css?family=Oregano' rel='stylesheet' type='text/css'>
</head>
<body>

	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"><span class="icon-bar"></span><span
					class="icon-bar"></span><span class="icon-bar"></span> </a><a
					class="brand" href="index.html"><div class = pageHeader>CVS Holiday Management </div> </a>
				<div class="nav-collapse">
					<ul class="nav pull-right">
						<li class="dropdown"><a href="login">Logout </a>
							<ul class="dropdown-menu">
								<li><a href="login">Logout</a></li>
								<li><a href="javascript:;">Help</a></li>
							</ul></li>

					</ul>
					<form class="navbar-search pull-right">
						<input type="hidden" class="search-query" placeholder="Search">
					</form>
				</div>
				<!--/.nav-collapse -->
			</div>
			<!-- /container -->
		</div>
		<!-- /navbar-inner -->
	</div>
	<p></p>
	<p></p>
	<br>
	<div class="subnavbar">
		<div class="subnavbar-inner">
			<div class="container">
				<ul class="mainnav">
					<li><a href="index.html"><i class="icon-dashboard"></i><span>Home</span>
					</a></li>
					<li><a href="book"><i class="icon-list-alt"></i><span>Book</span>
					</a></li>
					<li><a href="showmydays"><i class="icon-facetime-video"></i><span>View</span>
					</a></li>
					<li class="active"><a href="admin"><i
							class="icon-facetime-video"></i><span>Admin</span> </a></li>
				</ul>

			</div>
			<!-- /container -->
		</div>
		<!-- /subnavbar-inner -->
	</div>
	<!-- /subnavbar -->
	<script type="text/javascript"
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
	<script type="text/javascript" src="js/glDatepicker.js">
	</script>
	


	<c:forEach items="${userTeam}" var="item">
		<form method="post" action="/teamConfirm">
			Team Member<br> Username: ${item.userName}<br> First Name:
			${item.firstName}<br> Last Name: ${item.lastName}<br>
			Group: ${item.groupName}<br> Set Group: <select name="newGroup"
				id="${item.userName}">
				<option>Minute</option>
				<option>Retail</option>
				<option>PBM</option>
			</select> <input type="hidden" value="${item.userName}" name="userName"
				id="${item.userName}" />
			<button id="Approve" type="submit"
				class="button btn btn-success btn-large" name="action">Confirm
			</button>
			<p></p>
		</form>
	</c:forEach>


	<p></p>

	<p>
	
	


		<c:forEach items="${days}" var="item">
			<form method="post" action="/request">
				New Holiday Request<br> User Request: ${item.username}<br>
				Date Requested: ${item.date}<br> Start Date: ${item.startDate}<br>
				End Date: ${item.endDate}<br> <input type="hidden"
					value="${item.id}" name="jamcup" id="jamcup" />
				<button id="Approve" type="submit"
					class="button btn btn-success btn-large" name="action" value="true">Approve
				</button>
				<button id="Decline" type="submit"
					class="button btn btn-success btn-large" name="action"
					value="Declined">Decline</button>
				<p></p>
			</form>
		</c:forEach>



		<c:forEach items="${user}" var="users">
			<form method="post" action="/allocationChange">
				<input type="hidden" value="${users.userName}" name="userID"
					id="userID" /> <br> User: ${users.userName}<br> Current
				Allocation: ${users.allocation}<br> New Allocation:<input
					type="text" name="newAllocation" id="newAllocation" />
				<p></p>
				<button id="Confirm" type="submit"
					class="button btn btn-success btn-large" name="action">Confirm
				</button>
			</form>
		</c:forEach>

		<c:forEach items="${mandatory}" var="mandatory">
			<form method="post" action="/mandatoryChange">
				<header>${mandatory}</header>
				<p></p>
				<input id="todate" name="todate" type="text"
					placeholder="Mandatory Date" />
				<script type="text/javascript">
					$(window)
							.load(
									function() {
										$('#todate')
												.glDatePicker(
														{
															selectableDOW : [
																	1, 2, 3, 4,
																	5 ],
															dowNames : "SMTWTFS",
															dowOffset : 1,
															width : 250,
															onClick : function(
																	target,
																	cell, date,
																	data) {
																var month = date
																		.getMonth() + 1;
																target
																		.val(date
																				.getFullYear()
																				+ '-'
																				+ month
																				+ '-'
																				+ date
																						.getDate());

																if (data != null) {
																	alert(data.message
																			+ '\n'
																			+ date);
																}
															}

														});

									});
				</script>
				
				<br>
				<button type="submit" class="button btn btn-success btn-large">Set
				</button>
			</form>
		</c:forEach><div class="stats"> 

		<c:forEach items="${event}" var="event">
			<form method="post" action="/eventCreate">
				<header>${event}</header>
				<p></p>
				<input id="todate" name="todate" type="text"
					placeholder="Event Date" />
				<script type="text/javascript">
					$(window)
							.load(
									function() {
										$('#todate')
												.glDatePicker(
														{
															selectableDOW : [
																	1, 2, 3, 4,
																	5 ],
															dowNames : "SMTWTFS",
															dowOffset : 1,
															width : 250,
															onClick : function(
																	target,
																	cell, date,
																	data) {
																var month = date
																		.getMonth() + 1;
																target
																		.val(date
																				.getFullYear()
																				+ '-'
																				+ month
																				+ '-'
																				+ date
																						.getDate());

																if (data != null) {
																	alert(data.message
																			+ '\n'
																			+ date);
																}
															}

														});

									});
				</script>
				<br>
				<input id="title" name="title" type="text"
					placeholder="Event Title" />
					<br>
				<textarea id ="event" name="event" rows="4" cols="10"> Please Submit Info about this event</textarea>
				<br>
				<button type="submit" class="button btn btn-success btn-large">Set
				</button>
			</form>
		</c:forEach><div class="stats"> 
	
</div><div id="container"><div id="navigation">
	 <div class="widget widget-nopad">
	            <div class="widget-header"> <i class="icon-list-alt"></i>
	              <h3>Admin Controls</h3>
	            </div>
	            <!-- /widget-header -->
	            <div class="widget-content">
	              <ul class="news-items">
	                <li>
	                  
	                  
	                  <div class="news-item-detail"> <a href="allocation" class="news-item-title"> Set Allocation for team users</a>
	                    <p class="news-item-preview"> Manage holiday allocation within your team, all users will be defaulted to 20 days. Please consult HR before making changes </p>
	                  </div>
	                  
	                </li>
	                <li>
	                  
	                  
	                  <div class="news-item-detail"> <a href="teams" class="news-item-title">Manage Team Members</a> 
	                    <p class="news-item-preview"> App Landing is a retina ready responsive app landing page website template perfect for software and application developers and small business owners looking to promote their iPhone, iPad, Android Apps and software products.</p>
	                  </div>
	                  
	                </li>
	                <li>
	                  
	          
	                  <div class="news-item-detail"> <a href="showrequests" class="news-item-title">View Holiday Requests</a>
	                    <p class="news-item-preview"> Formify is a contribution to lessen the pain of creating contact forms. The collection contains six different forms that are commonly used. These open source contact forms can be customized as well to suit the need for your website/application.</p>
	                  </div>
	                  
	                </li>
	                
	                 <li>
	                  
	                  
	                  <div class="news-item-detail"> <a href="mandatory" class="news-item-title">Set Mandatory Days</a>
	                    <p class="news-item-preview"> Formify is a contribution to lessen the pain of creating contact forms. The collection contains six different forms that are commonly used. These open source contact forms can be customized as well to suit the need for your website/application.</p>
	                  </div>
	                  
	                </li>
	                
	                  <li>
	                  
	                  
	                  <div class="news-item-detail"> <a href="event" class="news-item-title">Create Events for Upcoming Events</a>
	                    <p class="news-item-preview"> Formify is a contribution to lessen the pain of creating contact forms. The collection contains six different forms that are commonly used. These open source contact forms can be customized as well to suit the need for your website/application.</p>
	                  </div>
	                  
	                </li>
	                
	                  <li>
	                  
	                  
	                  <div class="news-item-detail"> <a href="event" class="news-item-title">	View my Team's Holidays</a>
	                    <p class="news-item-preview"> Formify is a contribution to lessen the pain of creating contact forms. The collection contains six different forms that are commonly used. These open source contact forms can be customized as well to suit the need for your website/application.</p>
	                  </div>
	                  
	                </li>
	              </ul>
	            </div>
	            </div>
	           </div>
	           </div>
	     

</body>
</html>